<html>
<head><meta charset="utf-8"><title>Why must profiles be at the workspace root? · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Why.20must.20profiles.20be.20at.20the.20workspace.20root.3F.html">Why must profiles be at the workspace root?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="218948634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Why%20must%20profiles%20be%20at%20the%20workspace%20root%3F/near/218948634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Why.20must.20profiles.20be.20at.20the.20workspace.20root.3F.html#218948634">(Dec 05 2020 at 19:12)</a>:</h4>
<p>I just got this warning from cargo:</p>
<div class="codehilite"><pre><span></span><code>warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /home/joshua/rustc2/src/librustdoc/Cargo.toml
workspace: /home/joshua/rustc2/Cargo.toml
</code></pre></div>
<p>why can't cargo just read the profiles from the current package?</p>



<a name="218948721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Why%20must%20profiles%20be%20at%20the%20workspace%20root%3F/near/218948721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Why.20must.20profiles.20be.20at.20the.20workspace.20root.3F.html#218948721">(Dec 05 2020 at 19:14)</a>:</h4>
<p>Profiles apply to all dependencies. Inside a workspace there is no "current" package. You can pass <code>-p</code> multiple times to build multiple packages in a workspace at the same time.</p>



<a name="218948742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Why%20must%20profiles%20be%20at%20the%20workspace%20root%3F/near/218948742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Why.20must.20profiles.20be.20at.20the.20workspace.20root.3F.html#218948742">(Dec 05 2020 at 19:15)</a>:</h4>
<p>is there a way to apply this to only crates in the current package? I want rustdoc to be built without debug info but the rest of the compiler to be unchanged</p>



<a name="218948810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Why%20must%20profiles%20be%20at%20the%20workspace%20root%3F/near/218948810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Why.20must.20profiles.20be.20at.20the.20workspace.20root.3F.html#218948810">(Dec 05 2020 at 19:16)</a>:</h4>
<p>You can use <code>[profile.dev.package.rustdoc]</code> I think. It may be ambiguous though as you have <code>src/librustdoc</code> and <code>src/tools/rustdoc</code>.</p>



<a name="218948822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Why%20must%20profiles%20be%20at%20the%20workspace%20root%3F/near/218948822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Why.20must.20profiles.20be.20at.20the.20workspace.20root.3F.html#218948822">(Dec 05 2020 at 19:17)</a>:</h4>
<p>src/tools/rustdoc is <code>rustdoc-tool</code> I think</p>



<a name="218948839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Why%20must%20profiles%20be%20at%20the%20workspace%20root%3F/near/218948839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Why.20must.20profiles.20be.20at.20the.20workspace.20root.3F.html#218948839">(Dec 05 2020 at 19:17)</a>:</h4>
<p>ok yes, <code>package.rustdoc</code> worked, thanks :)</p>



<a name="218948969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Why%20must%20profiles%20be%20at%20the%20workspace%20root%3F/near/218948969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Why.20must.20profiles.20be.20at.20the.20workspace.20root.3F.html#218948969">(Dec 05 2020 at 19:21)</a>:</h4>
<p>(deleted)</p>



<a name="218949034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Why%20must%20profiles%20be%20at%20the%20workspace%20root%3F/near/218949034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Why.20must.20profiles.20be.20at.20the.20workspace.20root.3F.html#218949034">(Dec 05 2020 at 19:22)</a>:</h4>
<p>(deleted)</p>



<a name="218949040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Why%20must%20profiles%20be%20at%20the%20workspace%20root%3F/near/218949040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Why.20must.20profiles.20be.20at.20the.20workspace.20root.3F.html#218949040">(Dec 05 2020 at 19:22)</a>:</h4>
<p>(deleted)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>